/* 全局样式 */
@import './var.scss';

// 通用标题
.gi_title {
  font-size: 14px;
  margin-bottom: 12px;
}

// 通用外边距
.gi_margin {
  margin: $margin;
}

// 通用内边距
.gi_padding {
  padding: $padding;
}

.gi_relative {
  position: relative;
}

.gi_absolute {
  position: absolute;
}

.gi_rotate_90deg {
  transition: all 0.3s;
  transform: rotate(90deg);
}

.gi_rotate_-90deg {
  transition: all 0.3s;
  transform: rotate(-90deg);
}

.gi_rotate_180deg {
  transition: all 0.3s;
  transform: rotate(180deg);
}

.gi_rotate_-180deg {
  transition: all 0.3s;
  transform: rotate(-180deg);
}

// 通用盒子
.gi_box {
  background: var(--color-bg-1);
  border-radius: $radius-box;
  overflow: hidden;
}

// 鼠标悬停
.gi_hover {
  transition: color 0.3s;
  &:hover {
    color: $color-theme !important;
    cursor: pointer;
  }
}

.gi_select_input {
  width: 120px !important;
}

.gi_search_input {
  width: 250px !important;
}

.gi_line_1 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gi_line_2 {
  -webkit-line-clamp: 2;
}

.gi_line_3 {
  -webkit-line-clamp: 3;
}

.gi_line_4 {
  -webkit-line-clamp: 4;
}

.gi_line_5 {
  -webkit-line-clamp: 5;
}

.gi_line_2,
.gi_line_3,
.gi_line_4,
.gi_line_5 {
  overflow: hidden;
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box; // 弹性伸缩盒
  -webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式
}

.gi_flex_box {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gi_lr_page {
  flex: 1;
  padding: $margin;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  > .left {
    @extend .gi_box;
    flex: 1;
    min-width: 260px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  > .right {
    @extend .gi_box;
    flex: 5;
    margin-left: $margin;
    box-sizing: border-box;
    overflow: hidden;
  }
}

.gi_hover_btn {
  border: 0 !important;
  background-color: transparent !important;
  &:hover {
    background: var(--color-secondary-hover) !important;
  }
  &:active {
    background: var(--color-secondary-active) !important;
  }
}
